
	footer.init();
	header.init('红人');
	app.ajax(
		'/Member/Index/index',
		null,
		function(res){
			app.tpl($('.user-per'),'tpl-user-per',res);
		}
	);

window.onload = function(){

	$('header .back').empty();
	$('footer .comm p').addClass('font-active');
	$('footer .comm img').attr('src','../img/icon/per2.png');
	$('body').on('click','.fun .order',function(){
		app.open('user.orderlist.html','orderList',{},window.location.href,document.body.scrollTop);
	});
	
	$('body').on('click','.fun .vouchers',function(){
		app.open('user.vouchers.html','vouchers',{},window.location.href,document.body.scrollTop);
	});
	
	$('body').on('click','.fun .fans',function(){
		app.open('user.fans.mess.html','fansMess',{},window.location.href,document.body.scrollTop);
	});
	
	$('body').on('click','.fun .set',function(){
		app.open('user.setPer.html','setPer',{},window.location.href,document.body.scrollTop);
	});
	
	$('body').on('click','.fun .shop',function(){
		app.open('shop.html','shop',{},window.location.href,document.body.scrollTop);
	});
	//普通用户的账单消费  
	$('body').on('click','.user-bill',function(){
		app.open('user.bill.html','bill',{},window.location.href,document.body.scrollTop);
	});
	
	$('body').on('click','button.exit',function(){
		layer.msg('退出成功');
	});
	$('body').on('click','#red img',function(){
		$('#red').addClass('mrotate');
		setTimeout(function(){
			$('#red').hide();
			$('#getRedbag').removeClass('dN');
		},1000);
		$('.animate-left').css({
			top:'18rem',
			left:'-1.5rem'
		});
		$('.animate-right').css({
			top:'18rem',
			right:'-1.5rem'
		});
//		$('#getRedbag').show();
	
		$('.animate-left').show().addClass('moveL');
		$('.animate-right').show().addClass('moveR');

		$('<audio id="chatAudio"><source src="../img/hb/diaoluo_da.mp3" type="audio/mpeg"></audio>').appendTo('body');//载入声音文件
		return false;
	});
	
	$('body').on('click','#getRedbag img.close',function(){
		$('#getRedbag ').hide();
		return false;
	});
};
